#include "sigmask.h"
#include "itrupt_timer.h"


void mask_signal_init()
{
    struct sigaction sigtick;
    int ret = 0;

    sigemptyset(&all_sig_set);
    sigfillset(&all_sig_set);
    //mask all sig for all task,get one task first open it
    ret = pthread_sigmask(SIG_SETMASK, &all_sig_set, NULL);

    sigtick.sa_flags = 0;
    sigtick.sa_handler = tick_handler;
    sigfillset(&sigtick.sa_mask);

    ret = sigaction(SIGALRM, &sigtick, NULL);

    if (ret)
        printf("%s error\n", __FUNCTION__);
    return;

}
